import sys
from PySide2 import QtWidgets, QtGui, QtCore
from PySide2.QtWebEngineWidgets import *

def _fullScreenRequested( request ):
    request.accept()
    w.showFullScreen()

argvs = sys.argv
# 支援flash

app = QtWidgets.QApplication(argvs)
w = QWebEngineView()
w.settings().setAttribute(QWebEngineSettings.PluginsEnabled, True)
w.settings().setAttribute(QWebEngineSettings.JavascriptEnabled, True)
w.settings().setAttribute(QWebEngineSettings.FullScreenSupportEnabled, True)
w.settings().setAttribute(QWebEngineSettings.LocalContentCanAccessFileUrls,True)
w.page().fullScreenRequested.connect(_fullScreenRequested)


w.load(QtCore.QUrl(r"K:/编程code/python/天音波影院/html漫画阅读器/漫画阅读器.html"))
# w.load(QtCore.QUrl('https://youtu.be/fAIX12F6958'))

w.show()
app.exec_()